package com.keur.money.utils.dialog

import android.content.Context
import android.view.Gravity
import android.view.WindowManager
import com.keur.money.R
import com.keur.money.app.MyApp
import com.keur.money.base.utils.DensityUtils
import com.keur.money.base.utils.dialog.BaseDialog

abstract class ProDialog(context: Context?): BaseDialog(context) {

    override fun initWindow() {
        val params = window?.attributes
        params?.width = MyApp.app.getPhoneWidth() - DensityUtils.dp2px(32f)
        params?.height = WindowManager.LayoutParams.WRAP_CONTENT
        window?.attributes = params
        window?.setWindowAnimations(R.style.dialog_scale_anim) //修改动画样式
        window?.setGravity(Gravity.CENTER)
    }
}